package com.lzk.工厂模式.抽象工厂.order;

import com.lzk.工厂模式.抽象工厂.pizza.LDCheesePizza;
import com.lzk.工厂模式.抽象工厂.pizza.LDPepperPizza;
import com.lzk.工厂模式.抽象工厂.pizza.Pizza;

/**
 * author: 刘中魁
 */
public class LDFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("使用的抽象工厂模式");
        Pizza pizza = null;

        if (orderType.equals("cheese")){
            pizza = new LDCheesePizza();

        }else if (orderType.equals("pepper")){
            pizza = new LDPepperPizza();
        }

        return pizza;
    }
}
